package com.hy.controller;

import com.hy.pojo.District;
import com.hy.service.DistrictService;
import com.hy.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("district")
public class DistrictController {
    @Autowired
    DistrictService districtService;

    @RequestMapping("findDistrict")
    public Result findDistrict(Integer cityId){
        List<District>list = districtService.findDistrict(cityId);
        return Result.success("查询成功", list);
    }
}
